package com.hw8.mongoDao;

import com.hw8.mongo.MongoDbDao;
import com.hw8.mongobean.Goods;
import org.springframework.stereotype.Repository;

@Repository
public class GoodsMongoDao extends MongoDbDao<Goods> {
    @Override
    protected Class<Goods> getEntityClass() {
        return Goods.class;
    }

    public Goods queryByGoodsId(Integer goodsId){
        Goods goods =  new Goods();
        goods.setGid(goodsId);
        return this.queryOne(goods);
    }
}
